package controllers;

import java.util.ArrayList;
import java.util.List;

import models.DrSecret;
import models.SystemOperator;

import org.apache.commons.lang.StringUtils;

import services.DictService;
import vos.Node;
import vos.ResultVo;

/**
 * 参照控制类
 * @author wangshaoming
 *
 */
public class HelpController extends BaseController {
	/**
	 * 获取下拉框参照
	 * @param dictCode
	 */
	public static void getComboBox(String dictCode){
		List<Node> dicts=DictService.getComboBox(dictCode);
		renderJSON(dicts);
	}
	/**
	 * 获取角色下拉框
	 */
	public static void getRoleCombobox(){
		List<Node> dicts=DictService.getRoleComboBox();
		renderJSON(dicts);
	}
	/**
	 * 获取密级下拉框
	 */
	public static void getSecretCombobox(){
		List<Node> dicts=DictService.getSecretCombobox();
		renderJSON(dicts);
	}
	/**
	 * 获取用户密级下拉框
	 */
	public static void getUserSecretCombobox(){
		SystemOperator opr=getLoginUser();
		DrSecret secret=DictService.getSecretById(opr.getSecretLevel());
		List<Node> dicts=DictService.getUserSecretCombobox(secret.getSelev());
		renderJSON(dicts);
	}
}
